package com.tarena.lbs.coupon.enums;


import com.tarena.lbs.base.protocol.enums.ErrorCodeSupport;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

@Getter
@AllArgsConstructor
@NoArgsConstructor
public enum StockResultEnum implements ErrorCodeSupport {

    SUCCESS("0", "success"),
    FAILED("500", "服务错误，请稍后"),

    /**
     * 业务异常，code 从10001开始
     */
    DATA_NOT_FIND("10001", "参数错误"),
    DATE_ERROR("10002", "日期参数错误"),
    ACTIVITY_NOT_FIND("20001", "活动不存在"),
    COUPON_NOT_FIND("20001", "优惠券不存在"),
    USER_ID_NULL("30001", "用户ID不能为空"),
    COUPON_ID_NULL("30002", "优惠券ID不能为空"),
    COUPON_INVALID("30003", "优惠券无效"),
    COUPON_TIME_INVALID("30004", "优惠券时间无效"),
    COUPON_ALREADY_RECEIVED("30005", "优惠券已领取"),
    COUPON_STOCK_EMPTY("30006", "优惠券库存不足"),
    COUPON_RECEIVE_FAIL("30007", "优惠券领取失败"),
    USER_NOT_FIND("30008", "用户不存在"),
    USER_COUPONS_NOT_FIND("30009", "用户优惠券不存在"),
    USER_COUPONS_INVALID("30010", "用户优惠券无效"),
    SAVE_ERROR("30011", "保存失败"),
    UPDATE_ERROR("30012", "更新失败");



    private String code;
    private String message;

}

